<?php

namespace App\Http\Controllers\Admin;

use App\Model\User;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class UserController extends CommonController
{
    //会员管理
    public function index(Request $request)
    {
        $map = [];
        //手机号码
        if (!empty($keyword = $request->keyword)) {
            $map[] = ['tel', 'like', "%{$keyword}%"];
        }
        $users = User::where($map)->paginate(5);
        return view('admin.user.index', compact('users'));
    }

}
